<?php

    echo 'Share';
    if(isset($query))
    {
        foreach($query->result_array() as $row)
        {
            echo '<br />';
            $data = array(
                        'name' => 'source_code',
                        'id' => 'source_codes',
                        'class' => 'lined',
                        'rows' => '20%',
                        'cols' => '100%',
                        'value' => $row['source_code'],
                        'disabled' => 'disabled'
                    );
    
            echo form_textarea($data);
            echo '<br />';
            echo 'Share URL: ' . anchor('share/' . $row['source_unique'],base_url() . 'share/' . $row['source_unique']);
            echo '<br />';
            echo '<small>Unique Code: ' . $row['source_unique'] . '</small>';
            echo '<br />';
            echo '<small>Created: ' . $row['source_created'] . '</small>';            
        }        
    }
?>
<script>
$(function() {
    $(".lined").linedtextarea(
    );
});
</script>
